﻿
using BCCommon;
using BCCommon.Enums;
using BCData.Sim.Company.Position;
using BCDto.Sim.Admin.Admin;
using BCDto.Sim.Company.Position;
using BCEntity.Sim.Company.Position;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.Sim.Company.Position
{
	/// <summary>
	/// 岗位
	/// </summary>
	public interface IPositionService
	{
		#region  成员方法
		/// <summary>
		/// 是否存在此记录
		/// </summary>
		/// <param name="positionId">岗位Id</param>
		bool Exists(int positionId);
		/// <summary>
		/// 添加岗位
		/// </summary>
		/// <param name="requestDto">岗位信息</param>
		/// <param name="adminDto"></param>
		PositionDto Add(PositionRequestDto requestDto, AdminDto adminDto);
		/// <summary>
		/// 更新岗位
		/// </summary>
		/// <param name="putDto">岗位信息</param>
		/// <param name="adminDto"></param>
		PositionDto Update(PositionPutDto putDto, AdminDto adminDto);
		/// <summary>
		/// 删除岗位
		/// </summary>
		/// <param name="positionId">岗位Id</param>
		bool Delete(int positionId);
		/// <summary>
		/// 获取岗位
		/// </summary>
		/// <param name="positionId">岗位Id</param>
		PositionDto Get(int positionId);
		/// <summary>
		/// 获取岗位
		/// </summary>
		/// <param name="companyId">公司Id</param>
		/// <param name="departmentId">部门Id</param>
		/// <param name="positionNo">岗位编号</param>
		PositionDto Get(int companyId, int departmentId, string positionNo);
		/// <summary>
		/// 获取岗位列表
		/// </summary>
		/// <param name="companyId">公司Id</param>
		/// <param name="departmentId">部门Id</param>
		/// <param name="enabled">启用</param>
		IEnumerable<PositionDto> GetList(int companyId, int? departmentId, bool? enabled);
		/// <summary>
		/// 获取岗位树形列表
		/// </summary>
		/// <param name="companyId">公司Id</param>
		/// <param name="departmentId">部门Id</param>
		/// <returns></returns>
		List<object> GetPositionTree(int companyId, int? departmentId);
		/// <summary>
		/// 获取岗位分页列表
		/// </summary>
		/// <param name="companyId">公司Id</param>
		/// <param name="departmentId">部门Id</param>
		/// <param name="enabled">启用</param>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">岗位每页数据条数</param>
		PageableList<PositionDto> Query(int? companyId, int? departmentId, bool? enabled, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		/// <summary>
		/// 启用岗位
		/// </summary>
		/// <param name="positionId">岗位Id</param>
		bool Enabled(int positionId);
		/// <summary>
		/// 禁用岗位
		/// </summary>
		/// <param name="positionId">岗位Id</param>
		bool Disabled(int positionId);
		#endregion  成员方法
	}
}